let app = getApp()
var stylecss = require('../utils/stylecss.js');
Component({
    properties: {
      item: {
        type:Object,
        item:Object
      }
      },  
      data:{
        activeIndex: 0
      },
    lifetimes: {
        attached: function () {
           var list=this.data.item.list
           var id2=this.data.item.id+' &group_item'
          var css=stylecss.css(this.data.item.id);
          var css2=stylecss.css(id2);
           this.setData({
            list:list,
            css:css,
            css2:css2,
            handlerId:list[0].link.id
           })
       }
      },
    methods: {
      updateCur:function(e){
        var list=this.data.list
        this.setData({
          activeIndex:e.detail.cur,
          handlerId:list[e.detail.cur].link.id
        })
      }
    }
});
